#ifndef MCBOX_H
#define MCBOX_H
#include <string> //used in map<string, string> and config reading.
#include <sstream>//string to number convertion

#include <iostream> 
#include <fstream>
#include <cstring>
#include "math\randplus.h"
#include "string\strplus.h"
#include "chain.h"


using std::ofstream;
using std::cout;
using std::endl;

class MCbox_circular{
protected:
	static const int strBufSize=180;
	char buf[strBufSize];
	char filePrefix[80];
	unsigned long anglenums[180];
	unsigned long N_kink[MAXKINKNUM+1];
	unsigned long seeding;
	ofstream fp_log;


public:
    CircularChain dnaChain;
    MCbox_circular(
        char const *r_filePrefix, 
        int const length,
        unsigned long r_seeding = 23UL);
	MCbox_circular(
		int const length, 
		unsigned long r_seeding = 23UL);
	virtual ~MCbox_circular(){
        fp_log.close();
    }
    void logParameters(void);
    void logAngleDist(char *suffix = "");
    void clearAngleStats(void);
    void pushAngleStats(void);
    void logAccepts(void);
	double calcGyration(void);
    void performMetropolisCircularCrankOnly(long monte_step);
};

#endif /* MCBOX_H */